package org.common.utils.generatortable.entity.dispatchtask;
import java.util.Map;
import org.common.utils.annotation.TableConfig;

/**
 * 配置表父类
 */
@TableConfig
final class AbstractDispatchTask {

    /**
     * DispatchTask, 实体数据
     */
    abstract static class Entity {
        /**
         * 任务id
         */
        private int id;
        /**
         * 品质
         */
        private int quality;
        /**
         * 派遣时间(秒）
         */
        private int times;
        /**
         * 任务奖励
         */
        private String drop;
        /**
         * 需要星级
         */
        private int needStar;
        /**
         * 需要属性
         */
        private String needElement;
        /**
         * 派遣数量
         */
        private int numbers;
        /**
         * 权重
         */
        private int weight;
        /**
         * 角色等级
         */
        private int roleLevel;
        /**
         * key
         */
        private int key;
        /**
         * 活动id
         */
        private int activityId;

        protected void setId(int id) {
            this.id = id;
        }
        public int getId() {
            return this.id;
        }

        protected void setQuality(int quality) {
            this.quality = quality;
        }
        public int getQuality() {
            return this.quality;
        }

        protected void setTimes(int times) {
            this.times = times;
        }
        public int getTimes() {
            return this.times;
        }

        protected void setDrop(String drop) {
            this.drop = drop;
        }
        public String getDrop() {
            return this.drop;
        }

        protected void setNeedStar(int needStar) {
            this.needStar = needStar;
        }
        public int getNeedStar() {
            return this.needStar;
        }

        protected void setNeedElement(String needElement) {
            this.needElement = needElement;
        }
        public String getNeedElement() {
            return this.needElement;
        }

        protected void setNumbers(int numbers) {
            this.numbers = numbers;
        }
        public int getNumbers() {
            return this.numbers;
        }

        protected void setWeight(int weight) {
            this.weight = weight;
        }
        public int getWeight() {
            return this.weight;
        }

        protected void setRoleLevel(int roleLevel) {
            this.roleLevel = roleLevel;
        }
        public int getRoleLevel() {
            return this.roleLevel;
        }

        protected void setKey(int key) {
            this.key = key;
        }
        public int getKey() {
            return this.key;
        }

        protected void setActivityId(int activityId) {
            this.activityId = activityId;
        }
        public int getActivityId() {
            return this.activityId;
        }

    }

    /**
    * DispatchTask, 数据
    */
    abstract static class Data {
        /**
        * 配置实体不可修改列表数据<配置ID, 配置实体>
        */
        private Map<Integer , DispatchTask> entityMap;

        /**
        * 实体列表
        */
        public Map<Integer , DispatchTask> getEntityMap() {
            return entityMap;
        }

        /**
        * @return 根据指定ID获取配置实体
        */
        public DispatchTask get(int id) {
            return entityMap.get(id);
        }
    }

}